perm filename X[7,ALS] blob sn#032367 filedate 1973-04-02 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00004 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	\|$$M1NGR30$M2BDI25$M3CTL25$M4NGB25$MFFIX25$MCFOOBAZ$.
C00008 00003	$F2$CThis writeup is $F1MRPP3.WRU[XGP,REM]  $F31973 APR 01 0703 p.2
C00013 00004	$F2$CThis writeup is $F1MRPP3.WRU[XGP,REM]  $F31973 APR 01 0703 p.3
C00015 ENDMK
C⊗;

\|$$M1NGR30;$M2BDI25;$M3CTL25;$M4NGB25;$MFFIX25;$MCFOOBAZ[2,REM]$.
$F2$CThis writeup is $F1MRPP3.WRU[XGP,REM]  $F31973 APR 01 0703 p.1

$F3$CMaas Research Paper Plotter program, version 3 (earlier versions in 1969 used Calcomp 565)
$F2$CProgram to switch fonts and justify text, by Robert Elton Maas, 1973 March
$CThe system command to run this program is $F1RU MRPP3[XGP,REM]

$F3$J	The program asks for a command string of
the form <OUTPUT FILE>←<INPUT FILE> with perhaps switches after the input file name.
The input file must not contain line numbers,
but may contain a TV-EDIT directory which will be ignored.
It may also contain XGP escape characters (RUBOUT followed by ↓ or α)
at most places in the file.
The output file will be in a form that can be copied directly to the
XGP in mode 0 by means of the "XG" command,
and in addition there will be a file QQXGP.RPG
written, which contains the font switches needed for listing the file
on the XGP.  Upon exit, it will put $F1XG @QQXGP.RPG
$F3into your TTY buffer so that all you have to do is hit carriage return
to gronk the XGP.
	The first character of the input file will be interpreted as the
escape character you wish to use initially.
(In the remainder of this writeup, the character $FC1$F3 represents whatever
Escape Character you have in effect at the moment.)
Subsequent occurrances
of this character will escape to command mode and
cause special things to happen depending on the next character (see below).
If, however, the second character of your file is | or . then this program will
assume you left out the initial definition of the break character, and will
retroactively escape on the first character.
Using this feature allows you to create files that may be
concatinated without re-editing anything.
Simply begin each file
with $FC1$F3|$FC1$F3 or $FC1$F3.<crlf>
and delete directory pages whenever concatinating.
	Below is a list of commands, where
$F4<N>$F3 represents a character in the range of 0,1,2,...,9,A,B,...,F
that specifies the font ID number,
$F4<KH>$F3 represents any character,
and $F4<FONT>$F3 represents a font filename (defaults are .FNT[XGP,SYS])$.

$←R$-L$/'4;$→w$+L$→l$←w$/'2;$¬R$→r$.
$FC1$FF|<KH>		$j$F3(changes the escape character to <CHARACTER>)$.
$FC1$FFM<N><FONT>;	$j$F3(causes the font to be compiled, and selects it now)$.
$FC1$FFF<N>		$j$F3(selects a font which has already been compiled)$.
$FC1$FFS		$j$F3(generates a sample of the currently-selected font, see bulletin board)$.
$FC1$FF.		$j$F3(everything until next crlf is a comment, typed on tty but not included in output file)$.
$FC11			$j$F3(quotes the escape character, same kludge as "" in FORTRAN or ALGOL)$.
$FC1$FFJ		$j$F3(begins full-justify submode, use $FC1$F3. to get out of it.  While in this
  mode, the only escape command (either rubout-style or $FC1$F3-style)
  that is legal is "change font")$.
$FC1$FFC		$j$F3(begins center-the-line mode, until the next line feed occurs)$.

$F4Commands not yet implemented:
$FC1$FFf<N>		$j$F3(selects a font for just one character, then back to old font)$.
$FC1$FFR		$j$F3(begins align-text-against-right-margin-mode,
  until the next line feed occurs)$.
$FC1$FF≡		$j$F3(begins "pass exactly as-is" mode, suppresses
  /XJ mode until $FC1$FF.$F3 occurs)$.

$F4Switches not yet implemented:
$FF/XAPJUS		$j$F3(no command characters, will replace XAPJUS.SAI 2-way mode)$.
$FF/XJ			$j$F3(unless in paragraph, center,  right-align, or as-it-is
  mode, text will be parsed by xapjus scanner)$.



$F2$CThis writeup is $F1MRPP3.WRU[XGP,REM]  $F31973 APR 01 0703 p.2

$F1		Q-REGISTERS
$F3$J	There are 128 registers which can hold any 36-bit integer,
usually the horizonal coordinate of some column on the page.
The idea is to allow specification of multi-column tables and
$F2superscripts-above-subscripts$F3 in an easy and flexable way,
including automatic allocation of such things as "$F21/5 of a page$F3"
by simple division.  Each register is specified by an ASCII
character, hence some registers are actually inaccessible, but
who cares?  Register 0 (null character, inaccessible usually) is
called the "$F2accumulator$F3" and is the intermediate storage for
all sequences of arithmetic calculation.  Register '56 (the period
character) always represents the current column location.
Every time a character is written, this q-register is updated to
account for the space used up by the character, and if you try to
write in this q-register, a column select will be generated in
your output file as well as updating the q-register to reflect
the column select.
Q-reg's L and R are the LEFT-MARGIN and the RIGHT-MARGIN.
The commands are shown below, where the
letter Q represents any character, and is used to select a
q-register -- however, if Q is the right-apostrophe "'", then
instead of reading from a q-register, the octal digits from here
to the next semicolon are assembled into an unsigned constant
and that constant acts as an immediate operand: $.

$←R$-L$/'12;$→w$←L$+w$→l$←R$-w$→r$.
$FC1$FF←Q	$F3(Load ac from q-reg)
$FC1$FF+Q	$F3(ac plus q-reg, result in ac)
$FC1$FF-Q	$F3(ac minus q-reg, result in ac)
$FC1$FF¬Q	$F3(q-reg minus ac, result in ac)
$FC1$FF*Q	$F3(ac times q-reg, result in ac)
$FC1$FF/Q	$F3(ac divided by q-reg, result (quotient) in ac)
$FC1$FF\Q	$F3(q-reg divided by ac, result (quotient) in ac)
$FC1$FF~Q	$F3(maximum of ac and q-reg, result in ac)
$FC1$FF_Q	$F3(minimum of ac and q-reg, result in ac)
$FC1$FF→Q	$F3(store contents of ac into q-reg, immediate operand not allowed)
$FC1$FF↑Q	$F3(move text up q/200 inch)
$FC1$FF↓Q	$F3(move text down q/200 inch)
$FC1$FFj$F3 or $FC1$FFc$.
$F3$j(same as $FC1$F3J and $FC1$F3C except it sets up temporary margins from q-registers
l and r) $.

$F4Commands not yet implemented:
$FC1$FF%Q	$F3(ac divided by q-reg, remainder in ac)
$FC1$FFULABR$F3$j(underline from location L to location R,
on scan line A, with line thickness B -- each of L,A,B,R may be a q-reg
or an immediate operand)$.
$FC1$FF↔Q	$F3(swap the ac with the q-reg, immediate operand not allowed)

$F4Special meanings of the Q character not implemented:
$FF=<decimal digits>;	$F3(Decimal immediate operand)
$FFwq	$F3(operand is width of character q in current font)


$F2$CThis writeup is $F1MRPP3.WRU[XGP,REM]  $F31973 APR 01 0703 p.3

$F4Example of usage, making five columns on a page:$F3
$FC1$FF←R$FC1$FF-L$FC1$FF/'5;$FC1$FF→w$FC1$FF.			$F3q-reg w contains width of a col
$FC1$FF←L$FC1$FF→1$FC1$FF+w$FC1$FF→2$FC1$FF+w$FC1$FF$.
→3$FC1$FF+w$FC1$FF→4$FC1$FF+w$FC1$FF→5$FC1$FF.	$F3q-reg's 1,2,3,4,5 contain the column loc's
$FC1$FF←1$FC1$FF→.Hello$FC1$FF←2$FC1$FF→.This$FC1$FF←3$FC1$FF→.Is$FC1$FF←4$FC1$FF→$.
.A$FC1$FF←5$FC1$FF→.Test.$FC1$FF.	$F3one word in each column
$←R$-L$/'5;$→w$.			q-reg w contains width of a column
$←L$→1$+w$→2$+w$→3$+w$→4$+w$→5$.	q-reg's 1,2,3,4,5 contain the column loc's
$←1$→.Hello$←2$→.This$←3$→.Is$←4$→.A$←5$→.Test.
$←'20;$→↑$←'14;$→↓$.
$←1$→.$F1X$←.$→a$F2$↑↑x+2-i$←.$→b$←a$→.$↓↓foo$←.$~b$→.$.
$F1+Y$←.$→a$F2$↑↑2$←.$→b$←a$→.$↓↓baz$.
$←2$→.$F1Guess$.
$←3$→.$F2What$.
$←4$→.$F3That$.
$←5$→.$F4Was?

$←l$+w$→l$←r$-w$→r$.	Change temporary margins
$F3$jIf I add any new glorious features, the remainder of this page will
show examples of the beautiful things you can use them for.  For now,
mostly blank space on this page...$.
$|\\.Change escape character back to standard...